package erlwitch.project;

import java.io.File;
import java.io.Serializable;
import java.util.Date;

import org.gjt.sp.jedit.Buffer;

import erlwitch.parser.structure.Module;

public class SourceFile implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private String path;
	private Date lastParsed;
	private transient Buffer openBuffer;
	private transient File file;
	private Module module;

	public Module getModule() {
		return module;
	}

	public void setModule(Module module) {
		this.module = module;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public Date getLastParsed() {
		return lastParsed;
	}

	public void setLastParsed(Date lastParsed) {
		this.lastParsed = lastParsed;
	}

	public Buffer getOpenBuffer() {
		return openBuffer;
	}

	public void setOpenBuffer(Buffer openBuffer) {
		this.openBuffer = openBuffer;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	@Override
	public String toString() {
		return file.getName();
	}
	
}
